
<%@page import="intranet.tools.HTMLWriter"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
    	<meta http-equiv="refresh" content="30" />
       
        <script src="javascript/jquery1.js"></script>
		
	    </head>

<body>
	<table cellpadding="0" width="700" cellspacing="0" border="0" align="center">
		<tr><td height="10"> </td></tr>
				<tr valign="top" bgcolor="">
					<td align="left" height="15" class="wallname">
							<b><c:out value="${walls[0].TITLE}"></c:out>&nbsp;</b>
					</td>
				</tr>
				<tr>
					<td align="left" class="wallpurpose">
						<c:out value="${walls[0].PURPOSE}"/>
					</td>
				</tr>
				<tr><td height="10" bgcolor="" >&nbsp;</td></tr>
				<tr>
					<td align="left"  bgcolor="" style="padding-left: 30px; padding-right:30px;">
						<div class="newtopic">
						<form method="post">
							<span>Enter a new topic:</span>&nbsp;<input type="text" id="itemdesc" name="itemdesc" maxlength="250" style="width: 380px;" onkeypress="javascript:newTopic(event,'new_topic.html')">&nbsp;&nbsp;
							<input type="hidden" name="wallid" value="${walls[0].WALL_ID}">
							<input type="button" value="Post New" onclick="javascript:insertTopic('new_topic.html')">
						</form>
						</div>
					</td>
				</tr>
				<tr><td height="10" bgcolor="" >&nbsp;</td></tr>
				<c:if test="${fn:length(posts)>0}">
				<c:forEach var="i" begin="0" end="${fn:length(posts)-1}" step="1" varStatus ="status">
					<tr>
						<td align="left" style="padding-left: 30px; padding-right:30px;">
							<div class="commentblog">
								<span class="topic"><c:out value="${fn:escapeXml(posts[i].ITEM_DESC)}"/></span>
								<br><br>
									<span class="eventtext">Posted by:</span> <span class="userpost"><c:out value="${posts[i].USER_NAME}"></c:out></span>
									<c:choose>
										<c:when test="${counts[i]>2}">
											  <label class="commentlink" onclick="javascript:viewComment('${posts[i].ITEM_ID}','info${i}')">View all <c:out value="${counts[i]}"></c:out> comments</label>
										</c:when>
										<c:otherwise>
										
										</c:otherwise>
									</c:choose>
								<br>
								<div id="info${i}" class="usercomment">
									${comments[i]}
								</div>
								<p align="left" class="entercomment">
								Enter comment here:&nbsp;<textarea id="com${i}" name="com${i}" class="commentbox" onkeypress="addComment(event,this,'${posts[i].ITEM_ID}','info${i}');" onkeydown=""></textarea>
								</p>
							</div>
							
						</td>
					</tr>
					<tr><td height="15" style="padding-left: 30px; padding-right:30px;"><hr size="1" color="#CCC"></td></tr>
				</c:forEach>
				
				</c:if>
				
		<tr><td>&nbsp;</td></tr>
</table>
</body>
</html>